<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>

	<h2 class="page-header" style="margin-top: 20px;">用户管理</h2>

	<!-- 搜索 -->
	<form action="#" style="margin-bottom: 10px;">

		<div class="row">
			<div class="col-sm-4 col-xs-4">
				<input type="text" class="form-control" placeholder="用户名">
			</div>
			<div class="col-sm-4 col-xs-4">
				<input type="text" class="form-control" placeholder="其他条件">
			</div>
			<div class="col-sm-4 col-xs-4">
				<button class="btn  btn-primary " type="submit">搜索</button>
			</div>
		</div>
	</form>

	<div class="table-responsive">
		<table class="table table-striped">
			<thead>
				<tr>
					<th>序号</th>
					<th>用户名</th>
					<th>信誉指数</th>
					<th>状态</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>

				<c:forEach items="${user_lists}" var="user" varStatus="status">
					<tr>
						<td>${status.index+1}</td>
						<td>${user.username}</td>
						<td>${user.credit}</td>
						<td>${user.status}</td>
						<td><a data-toggle="modal" data-target="#userModal" onclick="value_u(${user.userid})"
							 style="text-decoration: none;">权限修改</a> &nbsp;
							<a  onclick="delete_u(${user.userid})" style="text-decoration: none;">删除用户</a></td>
					</tr>

				</c:forEach>


			</tbody>
		</table>
	</div>


	<!-- 模态框（Modal） -->
	<div class="modal fade" id="userModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×
					</button>
					<h4 class="modal-title" id="myModalLabel">
						用户权限修改
					</h4>
				</div>
				<div class="modal-body">
					<input type="hidden" id="userid_h" name="userid_h" value="">


					<form id="statuslist">
					<div class="form-group">
						<label >用户状态：</label>
						<input type="radio" value="1" name="UStatus" >活跃
						<input type="radio" value="0" name="UStatus" >禁用
					</div>
					</form>

				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">
						关闭
					</button>
					<button type="button" class="btn btn-primary" onclick="submitModify()">
						提交更改
					</button>
				</div>
			</div><!-- /.modal-content -->
		</div><!-- /.modal-dialog -->
	</div><!-- /.modal -->

</body>
</html>